#pragma once

#include "Error.h"

class Common : public Singleton<Common>
{
public:
	CONSTRUCTOR Common();
	DESTRUCTOR ~Common();

	bool SetClipboardData(const String& string);
	String GetClipboardData();

	String LowerCase(const String& string) const;
	String UpperCase(const String& string) const;

	String GetPath(const String& fileName) const;
	String GetName(const String& fileName) const;
	String GetFileName(const String& fileName) const;
	String GetExtention(const String& fileName) const;

	void SplitFileName(String& fullFileName, String& path, String& name, String& fileName, String& extention) const;

	String GetProgramFileName() const;
	String GetProgramDirectory() const;
	String GetCurrentDirectory() const;
	void SetCurrentDirectory(const String& newDir) const;

	bool IsWhiteSpace(c8 Char) const;
	bool IsLineBreak(c8 Char) const;
	bool IsDigit(c8 Char) const;
	bool IsLetter(c8 Char) const;
	bool IsLowerCaseLetter(c8 Char) const;
	bool IsUpperCaseLetter(c8 Char) const;

	void RemoveWhiteSpace(String& string) const;

	bool StringToBool(const String& string) const;
	s32 StringToInt(const String& string) const;
	f32 StringToFloat(const String& string) const;

	String BoolToString(bool Bool) const;
	String IntToString(s32 Int) const;
	String FloatToString(f32 Float) const;

	String GetCurrentDate();
};